import request from "@/utils/request";

// 查询文件列表
export function listUploads(query) {
  return request({
    url: "/admin/assets/uploads/",
    method: "get",
    params: query
  });
}

// 查询文件详细
export function getUploads(id) {
  return request({
    url: "/admin/assets/uploads/" + id + "/",
    method: "get"
  });
}

// 新增文件
export function addUploads(data) {
  return request({
    url: "/admin/assets/uploads/",
    method: "post",
    data: data
  });
}

// 修改文件
export function updateUploads(data) {
  return request({
    url: "/admin/assets/uploads/" + data.id + "/",
    method: "put",
    data: data
  });
}

// 删除文件
export function delUploads(id) {
  return request({
    url: "/admin/assets/uploads/" + id + "/",
    method: "delete"
  });
}

// 导出文件
export function exportUploads(query) {
  return request({
    url: "/admin/assets/uploads/export/",
    method: "get",
    params: query
  });
}
